package com.cainaer.product.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.cainaer.product.domain.ProductAlbum;
import com.cainaer.product.mapper.ProductAlbumMapper;
import com.cainaer.product.service.IProductAlbumService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 商品专辑表 服务实现类
 * </p>
 *
 * @author Tina
 * @since 2020-09-11
 */
@Service
public class ProductAlbumServiceImpl extends ServiceImpl<ProductAlbumMapper, ProductAlbum> implements IProductAlbumService {

    @Autowired
    private ProductAlbumMapper productAlbumMapper;

    /**
     * 新增商品专辑
     *
     * @param productAlbum
     * @return
     */
    @Override
    public Integer insertProductAlbum(ProductAlbum productAlbum) {
        return productAlbumMapper.insert(productAlbum);
    }

    /**
     * 编辑商品专辑
     *
     * @param productAlbum
     * @return
     */
    @Override
    public Integer editProductAlbum(ProductAlbum productAlbum) {
        return productAlbumMapper.updateById(productAlbum);
    }
}
